#include <algorithm>
#include <cstdio>
#include <queue>

const int N = 1e5 + 5;
int n, m, q, u, v, t, sft, a[N];
double p;
std::queue<int> q1, q2, q3;

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#else
  freopen("P2827 蚯蚓.in", "r", stdin);
  freopen("P2827 蚯蚓.out", "w", stdout);
#endif
#endif

  scanf("%d%d%d%d%d%d", &n, &m, &q, &u, &v, &t);
  p = 1.0 * u / v;
  for (int i = 1; i <= n; ++i) { scanf("%d", &a[i]); }
  std::sort(a + 1, a + n + 1, [](const int &lhs, const int &rhs) { return lhs > rhs; });
  for (int i = 1; i <= n; ++i) q3.emplace(a[i]);
  for (int i = 1, cho; i <= m; ++i) {
    std::queue<int> *tar = NULL;
    cho = -0x3f3f3f3f;
    if (!q3.empty() && q3.front() > cho) { cho = q3.front(), tar = &q3; }
    if (!q1.empty() && q1.front() > cho) { cho = q1.front(), tar = &q1; }
    if (!q2.empty() && q2.front() > cho) { cho = q2.front(), tar = &q2; }
    tar->pop();
    cho += sft;
    sft += q;
    q1.emplace((int)(cho * p) - sft);
    q2.emplace(cho - (int)(cho * p) - sft);
    if (i % t == 0) printf("%d ", cho);
  }
  putchar('\n');
  for (int i = 1, cho; i <= n + m; ++i) {
    std::queue<int> *tar = NULL;
    cho = -0x3f3f3f3f;
    if (!q3.empty() && q3.front() > cho) { cho = q3.front(), tar = &q3; }
    if (!q1.empty() && q1.front() > cho) { cho = q1.front(), tar = &q1; }
    if (!q2.empty() && q2.front() > cho) { cho = q2.front(), tar = &q2; }
    tar->pop();
    if (i % t == 0) printf("%d ", cho + sft);
  }
  return 0;
}